import React from 'react';
import classNames from 'classnames';

import TableEmptyImg from '@/assets/svg/table-empty.svg';

import styles from './index.module.less';

export interface EmptyProps {
  emptyText?: string;
  className?: string;
}

const Empty = (props: EmptyProps): JSX.Element => {
  const { emptyText = 'No Data', className: outerClassName } = props;

  return (
    <div
      className={classNames(
        'mt-2',
        'mb-2',
        styles['self-table-empty'],
        outerClassName
      )}
    >
      <TableEmptyImg className={styles.icon} />
      <div className="content-table-empty">{emptyText}</div>
    </div>
  );
};

export default Empty;
